package com.europe.business.europebusiness.ui.activity;

import android.webkit.WebView;
import android.widget.TextView;

import com.europe.business.europebusiness.R;
import com.europe.business.europebusiness.ui.activity.base.ActionBarActivity;

public class WebViewActivity extends ActionBarActivity {
TextView titleTextView,typeTextView,timeTextView;
    private WebView webView;
    @Override
    protected int setMainContent() {
        return R.layout.activity_webview;
    }

    @Override
    protected void initView() {
        super.initView();
        titleTextView=findViewById(R.id.news_title);
        typeTextView=findViewById(R.id.type);
        timeTextView=findViewById(R.id.time);
        setToolbarNavigationIcon(R.drawable.actionbar_back);
        setActionRight(false, getString(R.string.register), null);
        setTitle(getString(R.string.activity_detail));
        webView = findViewById(R.id.web_view);
        String content = getIntent().getStringExtra("content");
        String title=getIntent().getStringExtra("title");
        String time=getIntent().getStringExtra("time");
        String type=getIntent().getStringExtra("type");
        titleTextView.setText(title);
        timeTextView.setText(time);
        typeTextView.setText(type);
        webView.loadData(content, "text/html; charset=UTF-8", null);
    }
}
